# Maintainer: Jonathan Steel <jsteel at archlinux.org>
# Contributor: Mark Pustjens <pustjens@dds.nl>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributor: Giorgio Lando <patroclo7@gmail.com>
# Contributor: Leslie P. Polzer <polzer@gnu.org>

pkgname=isync
pkgver=1.4.4
pkgrel=4
pkgdesc="IMAP and MailDir mailbox synchronizer"
arch=('loong64' 'x86_64')
url="https://isync.sourceforge.io/"
license=('GPL2')
depends=('libsasl' 'zlib' 'db')
source=(https://downloads.sourceforge.net/sourceforge/isync/$pkgname-$pkgver.tar.gz
        openssl3-fix-b6c36624.patch
        https://downloads.sourceforge.net/sourceforge/isync/$pkgname-$pkgver.tar.gz.asc)
sha256sums=('7c3273894f22e98330a330051e9d942fd9ffbc02b91952c2f1896a5c37e700ff'
            '28cdd879c971488e91d9fc424dfeae04f030aa1d9549e1c469cbd5ec7dddbb83'
            'SKIP')
validpgpkeys=('96DD32BFBF9FAB04B0D95305AA283E0B2F1BB1D1'
              '63BFD037CAD71E8DFF3AEA3AC17714F08D1BDBBA')

prepare() {
  cd $pkgname-$pkgver
  patch -N -p1 -i ../openssl3-fix-b6c36624.patch
}

build() {
  cd $pkgname-$pkgver

  ./configure --prefix=/usr

  make
}

package() {
  cd $pkgname-$pkgver

  make DESTDIR="$pkgdir" install
}
